Skip to content

Add Linear and Sentry integrations#661

Merged
santoshkumarradha merged 9 commits into
mainfrom
codex/linear-sentry-integrations
Jun 15, 2026
Merged

Add Linear and Sentry integrations#661
santoshkumarradha merged 9 commits into
mainfrom
codex/linear-sentry-integrations

Conversation

@santoshkumarradha

@santoshkumarradha santoshkumarradha commented Jun 15, 2026

Copy link
Copy Markdown
Member

Draft status

This PR intentionally stays draft. Do not merge until real-provider E2E is completed with Linear and Sentry credentials.

Summary

  • Add first-party OSS Linear and Sentry trigger sources with provider signature verification.
  • Add deterministic Linear and Sentry capability-node packs, manifests, contracts, Dockerfiles, README files, and mocked provider tests.
  • Add Linear/Sentry to the integrations UI catalog and trigger dialog defaults, using react-icons provider logos instead of hand-drawn SVG glyphs.
  • Keep event filtering as optional free text; blank accepts every current/future provider event emitted by the source.
  • Add docs pages with DX setup, UI screenshots, and source-of-truth pointers.

UI / Docs Screenshots

Catalog with OSS sources:

Integrations catalog

Linear connect dialog:

Linear connect dialog

Sentry connect dialog:

Sentry connect dialog

Verification Completed

  • go test ./internal/sources/... ./internal/handlers in control-plane
  • go test ./... in integrations/linear/node
  • go test ./... in integrations/sentry/node
  • go build ./cmd/linear-node in integrations/linear/node
  • go build ./cmd/sentry-node in integrations/sentry/node
  • npx eslint src/components/triggers/SourceIcon.tsx src/pages/IntegrationsPage.tsx src/components/triggers/NewTriggerDialog.tsx src/test/pages/triggers-pages.test.tsx
  • npx vitest run src/test/pages/triggers-pages.test.tsx
  • npm run build in control-plane/web/client
  • docker build -f integrations/linear/node/Dockerfile -t agentfield-linear-node:test .
  • docker build -f integrations/sentry/node/Dockerfile -t agentfield-sentry-node:test .
  • Mock webhook ingest tests cover signed Linear and Sentry fixtures through POST /sources/:trigger_id, including event type, idempotency, and normalized payload behavior.
  • Mock provider tests cover Linear GraphQL client behavior, Sentry REST client behavior, and Linear/Sentry capability runtime handlers for health/read/write-style calls.

Remaining Before Ready/Merge

  • Linear real-provider E2E with LINEAR_API_KEY and LINEAR_WEBHOOK_SECRET:
    • receive a real Linear webhook into AgentField,
    • launch the Linear node,
    • call health, one read capability, and one safe write capability on a test issue.
  • Sentry real-provider E2E with SENTRY_AUTH_TOKEN, SENTRY_ORG, and SENTRY_CLIENT_SECRET:
    • receive a real Sentry webhook into AgentField,
    • launch the Sentry node,
    • call health, one read capability, and one safe write capability on a test issue.
  • Re-capture screenshots only if the UI changes during real-provider testing.

Notes

  • No Linear or Sentry API/webhook credentials were present in the local zsh environment, so real-provider smoke tests have not run yet.
  • Zapier is not added as a first-party OSS integration.

@santoshkumarradha santoshkumarradha requested review from a team and AbirAbbas as code owners June 15, 2026 04:50
@santoshkumarradha santoshkumarradha marked this pull request as draft June 15, 2026 04:53
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage gate

Thresholds from .coverage-gate.toml: per-surface ≥ 84%, aggregate ≥ 85%, max per-surface regression ≤ 1.0 pp, max aggregate regression ≤ 0.50 pp.

Surface Current Baseline Δ
control-plane 87.10% 87.40% ↓ -0.30 pp 🟡
sdk-go 91.80% 92.00% ↓ -0.20 pp 🟢
sdk-python 93.73% 93.73% ↑ +0.00 pp 🟢
sdk-typescript 90.41% 90.42% ↓ -0.01 pp 🟢
web-ui 84.83% 84.79% ↑ +0.04 pp 🟡
aggregate 85.67% 85.75% ↓ -0.08 pp 🟡

✅ Gate passed

No surface regressed past the allowed threshold and the aggregate stayed above the floor.

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

📐 Patch coverage gate

Threshold: 80% on lines this PR touches vs origin/main (from .coverage-gate.toml:thresholds.min_patch).

Surface Touched lines Patch coverage Status
control-plane 276 83.00%
sdk-go 44 100.00%
sdk-python 0 ➖ no changes
sdk-typescript 0 ➖ no changes
web-ui 4 100.00%

✅ Patch gate passed

Every surface whose lines were touched by this PR has patch coverage at or above the threshold.

@santoshkumarradha santoshkumarradha force-pushed the codex/linear-sentry-integrations branch from 063550b to 5db0cc4 Compare June 15, 2026 04:56
- GraphQL client detects `lin_oauth_` prefix and sends `Authorization:
  Bearer <token>` for OAuth access tokens. Personal API keys (`lin_api_`
  and other prefixes) continue sending the token raw per Linear's docs.
- Webhook idempotency: when `Linear-Delivery` header is absent, fall
  back to sha256(webhookId || timestamp || type || action) instead of
  the body's `webhookId` alone — webhookId identifies the subscription,
  not the delivery, so the old fallback would collapse distinct events.
- Migrate GetIssue, UpdateIssue, ResolveIssue, AssignIssue from legacy
  /api/0/issues/{id}/ to documented /api/0/organizations/{org}/issues/{id}/.
  All four now require Config.Organization, matching the existing pattern
  in ListIssueEvents and GetEvent.
- ListIssues: rename undocumented `limit` param to `per_page` so
  pagination shape matches ListIssueEvents and Sentry's de-facto API.
  Keep the deprecated project-scoped issues endpoint with a TODO to
  migrate once we can resolve project slug → id.
- TODO comments added pointing to Link-header cursor pagination as a
  follow-up.
Mirrors the Linear source's replay-protection pattern. Default tolerance
is 300s (Sentry doesn't document a recommended window, so this matches
Stripe's). Set `tolerance_seconds: 0` in the trigger config to disable.

Parses Sentry-Hook-Timestamp as RFC3339, unix seconds, or unix
milliseconds — Sentry's docs only show 'a timestamp', so accept the
common formats. Missing or unparseable headers fail closed when
tolerance > 0.
EU-region Sentry orgs MUST use https://de.sentry.io. US-region orgs
should use https://us.sentry.io. The default https://sentry.io only
works for legacy US-only orgs and returns 401/403 for everyone else
with no clear hint about region. Surface this in:

- docs/integrations/sentry.md: new 'Region / Base URL' section with
  the full table
- integrations/sentry/README.md: same table for the package readme
- integrations/sentry/agentfield-package.yaml: SENTRY_BASE_URL
  description spells out the three valid values

Ref https://docs.sentry.io/organization/data-storage-location/.
The Linear and Sentry capability runtimes shipped byte-identical
requiredString/stringInput/intInput/objectInput helpers plus a duplicated
firstNonBlank in each node's config. Hoist them to a new sdk/go/inputs
package with capitalized public names and migrate both nodes.

Databricks and Snowflake nodes still have their own copies — they carry
extra helpers (boolInput, compactJSON) that aren't shared yet. A
follow-up can pull those in once the helper surface stabilizes.
PR #661 swapped the inline DatabricksGlyph for SiDatabricks from
react-icons (consistent with how Stripe/GitHub/etc. now render).
The Databricks UI test hard-coded an expectation of 3 `<path>`
elements from the old hand-drawn glyph. Relax the assertion to 'at
least one path' so the test pins icon presence without coupling to
the exact SVG markup of whichever icon library renders it.
@santoshkumarradha santoshkumarradha force-pushed the codex/linear-sentry-integrations branch from e53246a to 7d21fd3 Compare June 15, 2026 19:30
@github-actions

Copy link
Copy Markdown
Contributor

Performance

SDK Memory Δ Latency Δ Tests Status
Go 225 B -20% 0.63 µs -37%

✓ No regressions detected

@santoshkumarradha santoshkumarradha marked this pull request as ready for review June 15, 2026 19:38
@santoshkumarradha santoshkumarradha merged commit edee822 into main Jun 15, 2026
31 checks passed
@santoshkumarradha santoshkumarradha deleted the codex/linear-sentry-integrations branch June 15, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant